project(Engine)

#find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
#find_package(Qt6 REQUIRED COMPONENTS Widgets)


set(Engine_Headers
"inc/gfx/vk/core.h"
"inc/gfx/vk/helper.h"
"inc/gfx/vk/vk_common.h"
"inc/gfx/vk/command.h"
"inc/res/static_resource.h"
"inc/system/window_system.h"
"inc/gui/GuiBase.h" "inc/gui/VkGui.h")

set(Engine_Source
"./main.cpp"
#"M.cpp"
"src/core.cpp"
"src/window_system.cpp"
"src/VkGui.cpp"
"src/GuiBase.cpp"
"src/GuiTheme.cpp" "src/core_pass_impl.cpp")

set(Engine_Platform)
set(SnakeBox_rc)

if(LINUX)
    message("===========current platform is Linux============")
    set(Engine_Platform "src/platform_linux/static_resource.cpp")
endif(LINUX)

if(WIN32)
    message("===========current platform is Windows============")
    set(SnakeBox_rc "./src/platform_windows/rc/application.rc")
    set(Engine_Platform "src/platform_windows/static_resource.cpp")
endif(WIN32)

add_executable(${PROJECT_NAME} ${Engine_Source} ${Engine_Headers} ${Engine_Platform} ${SnakeBox_rc})
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/inc" "${CMAKE_CURRENT_LIST_DIR}/protos/build" )
target_link_libraries(${PROJECT_NAME} PRIVATE utility glfw ImGui_GLFW_VK volk::volk)

set(shader_bin_dir "${CMAKE_CURRENT_LIST_DIR}/src/platform_windows/rc/shader")

add_subdirectory("./shader_source")

#set_target_properties(${PROJECT_NAME} PROPERTIES
#    AUTOMOC ON
#    AUTOUIC ON
#)